package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysGroupRoleResource;
import com.tsd.system.entity.SysGroupRoleResourceExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysGroupRoleResource服务实现层接口
 *
 * @author huawei
 * @date 2020/04/16 12:51:37
 */
public interface SysGroupRoleResourceService {

    /**
     * 描述：根据id获取SysGroupRoleResource
     *
     * @param id
     */
    SysGroupRoleResource getSysGroupRoleResourceById(Long id) throws Exception;

    /**
     * 描述：根据sid获取SysGroupRoleResource
     *
     * @param sid
     */
    SysGroupRoleResourceExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据id删除SysGroupRoleResource
     *
     * @param id
     */
    void deleteSysGroupRoleResource(Long id, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新SysGroupRoleResource
     *
     * @param record
     * @param opUser
     */
    void saveSysGroupRoleResource(SysGroupRoleResource record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询SysGroupRoleResource
     *
     * @param params
     * @param page
     */
    List<SysGroupRoleResourceExt> findSysGroupRoleResources(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询SysGroupRoleResource
     *
     * @param params
     */
    List<SysGroupRoleResourceExt> findSysGroupRoleResources(Map<String, Object> params) throws Exception;

    void saveSysResourceList2GroupRole(SysUser opUser, String userId, List<String> resourceIdList) throws Exception;

}
